package mz.co.frameworks.loader;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class DataSet {

	private String code;

	private Map<String, Row> rowMap = new HashMap<String, Row>();

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	public void addRow(Row row) {
		this.rowMap.put(row.getName(), row);
	}

	public Row getRow(String name) {
		return rowMap.get(name);
	}

	public Collection<Row> getRows() {
		return rowMap.values();
	}
}
